ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Toggle Css Format

by autokludge ALL

Plugin for fast css-style changing in Sublime Text 2

Details

  • 2012.08.16.12.21.04
  • github.​com
  • github.​com
  • 13 years ago
  • 3 hours ago
  • 13 years ago

Installs

  • Total 13K
  • Win 9K
  • Mac 3K
  • Linux 1K
Jun 8 Jun 7 Jun 6 Jun 5 Jun 4 Jun 3 Jun 2 Jun 1 May 31 May 30 May 29 May 28 May 27 May 26 May 25 May 24 May 23 May 22 May 21 May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12 May 11 May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

Singleline package for Sublime Text 2

SingleLine is a CSS Single to Multiline Style Switch plugin for Sublime Text 2.

It will convert between multi-line rules:

body {
    height: 600px;
    width: 600px;
    margin: auto;
    border: 1px solid #000;
}

to

body { height: 600px; width: 600px; margin: auto; border: 1px solid #000; }

It also works in less / scss with nested selectors:

.upperclass{
   .middleclass{
        .testclass{
            margin: 20px;
            padding: 10px;
            background: #f00;
        }
    }
}

to

.upperclass{
   .middleclass{
        .testclass{ margin: 20px; padding: 10px; background: #f00; }
    }
}

Keyboard Shortcuts

To toggle between single-line and multiline format you can either select the block or move the cursor inside the block and press ctrl+alt+j.

You can also expand selection to css rule with ctrl+shift+r.

Installing

Without Git: Download the latest source zip from github and extract the files to your Sublime Text “Packages” directory, into a new directory named SublimeToggleCssFormat.

With Git: Clone the repository in your Sublime Text “Packages” directory:

git clone git://github.com/speilberg0/SublimeToggleCssFormat.git

The “Packages” directory is located at:

  • OS X: ~/Library/Application Support/Sublime Text 2/Packages/
  • Linux: ~/.Sublime Text 2/Packages/
  • Windows: %APPDATA%/Sublime Text 2/Packages/

That's it!